package com.ks.lcn;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.codingapi.txlcn.tc.config.EnableDistributedTransaction;
import com.google.common.base.Preconditions;
import io.micrometer.core.instrument.util.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.transaction.annotation.Transactional;

@SpringBootApplication
@EnableDiscoveryClient
@EnableDistributedTransaction
public class LcnApplication {

    public static void main(String[] args) {
        SpringApplication.run(LcnApplication.class, args);
    }


    /**
     *  开启全局分布式事务
     */
    @LcnTransaction
    @Transactional
    public void createOrder(){

    }

}
